<?php
/**
 * Fuel is a fast, lightweight, community driven PHP5 framework.
 *
 * @package    Fuel
 * @version    1.5
 * @author     Fuel Development Team
 * @license    MIT License
 * @copyright  2010 - 2013 Fuel Development Team
 * @link       http://fuelphp.com
 */

// HTTPステータス
// nginxのキャッシュがステータスで保持期間など挙動を変えられる
// ※キャッシュ未使用なので、現在はあまり意味は無い
define('D_HTTP_CACHE', 200);
define('D_HTTP_UPDATE', 201);
define('D_HTTP_WARNING', 403);
define('D_HTTP_ERROR', 500);

return array(
	// 基本的に開発機の設定を書いておき、stage,productionは上書きする
	'member_password' => '6d022a1256cef754c635b81fe838d5e1',
	'domain_api' => 'http://dev01.gtlab.jp:50101',
	
	// アプリ情報
	'appinfo' => array(
		'ios' => array(
			'storeurl' => 'https://itunes.apple.com/jp/app/commesodo/id647075511',
			'urlscheme' => 'ComMeSoDo://',
		),
		'android' => array(),
	),

	// 管理画面/バッチ アクセス許可
	'manage' => array(
		'basicauth' => array(
			'admin/abcabc@123'
		)	
	),

	// iTunes
	'itunes_url_rss100' => 'https://itunes.apple.com/jp/rss/topsongs/limit=100/json',
	'itunes_url_rss300' => 'https://itunes.apple.com/jp/rss/topsongs/limit=300/json',
	'itunes_url_api' => 'https://itunes.apple.com/search?lang=ja_jp&country=jp&entity=song&',
	'itunes_gift' => 'https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/com.apple.jingle.app.finance.DirectAction/freeProductCodeWizard?code=',
	'itunes_scheme' => 'itmss://',
	
	// ポイントの係数
	'point_deadline_days' => 180, // 有効期限
	'point_rate_song' => 100, // 1曲あたりの単価
	'point_rate_max_itunes' => 250, // これ以下の楽曲のみ一覧に出す 
	
	// リストの表示件数
	'maxrows_commentlist' => 1000,
	'maxrows_searchlist' => 50,
	'maxrows_favoritelist' => 30,
	'maxrows_rankinglist' => 100,
	'maxrows_downloadlist' => 100,

	// リワード広告関係
	'reward_review' => '1.0.4', // 審査中のバージョン
	
	'reward_apprdv_apiurl' => 'http://appdriver.jp/4.0.%sads?media_id=%s&digest=%s',
	'reward_apprdv_apiinterval' => 60 * 5,
	// 本番
	'reward_appdrv_mediaId' => '2632',
	'reward_appdrv_siteId' => '9103',
	'reward_appdrv_siteKey' => '8ea72ad4a7bda54547f811daff939897',
	// SANDBOX
	//'reward_appdrv_mediaId' => '1492',
	//'reward_appdrv_siteId' => '6121',
	//'reward_appdrv_siteKey' => 'b8070f5740fa3c2f88bfdc3f3ddb5329',
	'reward_appdrv_ips' => array(
		// 連携APIの許可IP
		'59.106.111.156',
		'59.106.111.152',
		'219.117.253.234', // TM徳島
		'133.242.17.160'   // さくら開発機
		),
	// TODO:ver1.0.1以前のために残している
        'reward_appdrv_ids' => array(
			'default' => array(
				"media_id" => "2199",
			),			
		),
		
	'reward_smaad_apiurl' => 'http://ad.smaad.jp/api/iteminfo/getListDetail?output=json&feature=both&zone_id=%s&start=%d&results=%d',
	'reward_smaad_apiinterval' => 60 * 5,
	'reward_smaad_zoneId' => 13066216,
	'reward_smaad_rate' => 0.3, // 係数
	'reward_smaad_ips' => array(
		// 連携APIの許可IP
		'211.16.129.126',
		'219.117.253.234', // TM徳島
		'133.242.17.160'   // さくら開発機
		),
	
	'reward_ca_apiurl' => 'http://api.ca-reward.jp/reward/newapi/api/Api.php?api_key=%s&m_id=%s&page=%d&page_limit=%d&limit=300&user_id=_dummy_',
	'reward_ca_apiinterval' => 60 * 5,
	'reward_ca_apikey' => '90251cd5caae5f24',
	'reward_ca_mid' => '2275',
	'reward_ca_ips' => array(
		// 連携APIの許可IP
		'59.106.126.70',
		'59.106.126.73',
		'59.106.126.74',
		'219.117.253.234', // TM徳島
		'133.242.17.160'   // さくら開発機
		),
	'reward_ca_rate' => 0.3, // 係数

	'reward_affilead_apidomain' => 'www.affil.jp',
	'reward_affilead_apipath' => '/d/xml.php',
	'reward_affilead_apiinterval' => 60 * 60 * 2,
	'reward_affilead_siteNo' => '87071',
	'reward_affilead_rate' => 0.3, // 係数
	
	'reward_moba8_rate' => 0.3, // 係数
	
	// MAX値
	'maxlength_song' => 100,
	'maxlength_artist' => 100,

	// iMobile関係
	'imobile_sid' => '4098',
	'imobile_conv' => 'http://spdeliver.i-mobile.co.jp/app/ad_conv.ashx?sid=%s&url=%s',

	// キャッシュ
	'cache_comment_expiration' => 60 * 0.05,
	'cache_search_expiration' => 60 * 0.05,
	'cache_ranking_expiration' => 60 * 0.05,
	'cache_itunes_expiration' => 60 * 30,

	// ログ
	'log_threshold'    => Fuel::L_NONE,
	//'log_path'         => '/var/log/php/ComMeSoDo.development/',
	'log_api'    => '', //'td.commesodo_development.api', 課金対策のため消しておく
	'log_analyze' => '', // 'td.commesodo_development.analyze', 課金対策のため消しておく
	
	// 各種規制
	'regulation_comment_post' => 10, // コメント連投規制
	'regulation_comment_play' => 60 * 60 * 3, // コメント連投規制
	
	// その他
	'test_push_member_id' => array(
	),			
/**
 * base_url - The base URL of the application.
 * MUST contain a trailing slash (/)
 *
 * You can set this to a full or relative URL:
 *
 *     'base_url' => '/foo/',
 *     'base_url' => 'http://foo.com/'
 *
 * Set this to null to have it automatically detected.
 */
// 'base_url'  => null,

/**
 * url_suffix - Any suffix that needs to be added to
 * URL's generated by Fuel. If the suffix is an extension,
 * make sure to include the dot
 *
 *     'url_suffix' => '.html',
 *
 * Set this to an empty string if no suffix is used
 */
// 'url_suffix'  => '',

/**
 * index_file - The name of the main bootstrap file.
 *
 * Set this to 'index.php if you don't use URL rewriting
 */
// 'index_file' => false,

// 'profiling'  => false,

/**
 * Default location for the file cache
 */
// 'cache_dir'       => APPPATH.'cache/',

/**
 * Settings for the file finder cache (the Cache class has it's own config!)
 */
// 'caching'         => false,
// 'cache_lifetime'  => 3600, // In Seconds

/**
 * Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encoding of output
 */
// 'ob_callback'  => null,

// 'errors'  => array(
// Which errors should we show, but continue execution? You can add the following:
// E_NOTICE, E_WARNING, E_DEPRECATED, E_STRICT to mimic PHP's default behaviour
// (which is to continue on non-fatal errors). We consider this bad practice.
// 'continue_on'  => array(),
// How many errors should we show before we stop showing them? (prevents out-of-memory errors)
// 'throttle'     => 10,
// Should notices from Error::notice() be shown?
// 'notices'      => true,
// ),

/**
 * Localization & internationalization settings
 */
// 'language'           => 'en', // Default language
// 'language_fallback'  => 'en', // Fallback language when file isn't available for default language
// 'locale'             => 'en_US', // PHP set_locale() setting, null to not set

/**
 * Internal string encoding charset
 */
// 'encoding'  => 'UTF-8',

/**
 * DateTime settings
 *
 * server_gmt_offset	in seconds the server offset from gmt timestamp when time() is used
 * default_timezone		optional, if you want to change the server's default timezone
 */
// 'server_gmt_offset'  => 0,
// 'default_timezone'   => null,

/**
 * Logging Threshold.  Can be set to any of the following:
 *
 * Fuel::L_NONE
 * Fuel::L_ERROR
 * Fuel::L_WARNING
 * Fuel::L_DEBUG
 * Fuel::L_INFO
 * Fuel::L_ALL
 */
	// 'log_path'         => APPPATH.'logs/',
// 'log_date_format'  => 'Y-m-d H:i:s',

/**
 * Security settings
 */
'security' => array(
// 'csrf_autoload'    => false,
// 'csrf_token_key'   => 'fuel_csrf_token',
// 'csrf_expiration'  => 0,

/**
 * This input filter can be any normal PHP function as well as 'xss_clean'
 *
 * WARNING: Using xss_clean will cause a performance hit.
 * How much is dependant on how much input data there is.
 */
'uri_filter' => array('htmlentities'),

/**
 * This input filter can be any normal PHP function as well as 'xss_clean'
 *
 * WARNING: Using xss_clean will cause a performance hit.
 * How much is dependant on how much input data there is.
 */
// 'input_filter'  => array(),

/**
 * This output filter can be any normal PHP function as well as 'xss_clean'
 *
 * WARNING: Using xss_clean will cause a performance hit.
 * How much is dependant on how much input data there is.
 */
'output_filter' => array('Security::htmlentities'),

/**
 * Encoding mechanism to use on htmlentities()
 */
// 'htmlentities_flags' => ENT_QUOTES,

/**
 * Wether to encode HTML entities as well
 */
// 'htmlentities_double_encode' => false,

/**
 * Whether to automatically filter view data
 */
// 'auto_filter_output'  => true,

/**
 * With output encoding switched on all objects passed will be converted to strings or
 * throw exceptions unless they are instances of the classes in this array.
 */
'whitelisted_classes' => array('Fuel\\Core\\Response', 'Fuel\\Core\\View', 'Fuel\\Core\\ViewModel', 'Closure', ), ),

/**
 * Cookie settings
 */
// 'cookie' => array(
// Number of seconds before the cookie expires
// 'expiration'  => 0,
// Restrict the path that the cookie is available to
// 'path'        => '/',
// Restrict the domain that the cookie is available to
// 'domain'      => null,
// Only transmit cookies over secure connections
// 'secure'      => false,
// Only transmit cookies over HTTP, disabling Javascript access
// 'http_only'   => false,
// ),

/**
 * Validation settings
 */
// 'validation' => array(
/**
 * Wether to fallback to global when a value is not found in the input array.
 */
// 'global_input_fallback' => true,
// ),

/**
 * Controller class prefix
 */
// 'controller_prefix' => 'Controller_',

/**
 * Routing settings
 */
// 'routing' => array(
/**
 * Whether URI routing is case sensitive or not
 */
// 'case_sensitive' => true,

/**
 *  Wether to strip the extension
 */
// 'strip_extension' => true,
// ),

/**
 * To enable you to split up your application into modules which can be
 * routed by the first uri segment you have to define their basepaths
 * here. By default empty, but to use them you can add something
 * like this:
 *      array(APPPATH.'modules'.DS)
 *
 * Paths MUST end with a directory separator (the DS constant)!
 */
// 'module_paths' => array(
// 	//APPPATH.'modules'.DS
// ),

/**
 * To enable you to split up your additions to the framework, packages are
 * used. You can define the basepaths for your packages here. By default
 * empty, but to use them you can add something like this:
 *      array(APPPATH.'modules'.DS)
 *
 * Paths MUST end with a directory separator (the DS constant)!
 */
// 'package_paths' => array(
// 	//PKGPATH
// ),

/**************************************************************************/
/* Always Load                                                            */
/**************************************************************************/
// 'always_load'  => array(

/**
 * These packages are loaded on Fuel's startup.
 * You can specify them in the following manner:
 *
 * array('auth'); // This will assume the packages are in PKGPATH
 *
 * // Use this format to specify the path to the package explicitly
 * array(
 *     array('auth'	=> PKGPATH.'auth/')
 * );
 */
// 'packages'  => array(
// 	//'orm',
// ),

/**
 * These modules are always loaded on Fuel's startup. You can specify them
 * in the following manner:
 *
 * array('module_name');
 *
 * A path must be set in module_paths for this to work.
 */
// 'modules'  => array(),

/**
 * Classes to autoload & initialize even when not used
 */
// 'classes'  => array(),

/**
 * Configs to autoload
 *
 * Examples: if you want to load 'session' config into a group 'session' you only have to
 * add 'session'. If you want to add it to another group (example: 'auth') you have to
 * add it like 'session' => 'auth'.
 * If you don't want the config in a group use null as groupname.
 */
// 'config'  => array(),

/**
 * Language files to autoload
 *
 * Examples: if you want to load 'validation' lang into a group 'validation' you only have to
 * add 'validation'. If you want to add it to another group (example: 'forms') you have to
 * add it like 'validation' => 'forms'.
 * If you don't want the lang in a group use null as groupname.
 */
// 'language'  => array(),
// ),

);
